import { ApiProperty } from '@nestjs/swagger';

export class StatsOverviewDto {
  @ApiProperty({
    description: '今日访客数',
    example: 543
  })
  todayIp: number;

  @ApiProperty({
    description: '总访客数',
    example: 12345
  })
  totalIp: number;

  @ApiProperty({
    description: '访客数变化率(%)',
    example: 5.2
  })
  ipChangeRate: number;

  @ApiProperty({
    description: '今日浏览量',
    example: 2157
  })
  todayPv: number;

  @ApiProperty({
    description: '总浏览量',
    example: 68932
  })
  totalPv: number;

  @ApiProperty({
    description: '浏览量变化率(%)',
    example: -2.8
  })
  pvChangeRate: number;
}

export class StatsOverviewResponseDto {
  @ApiProperty({
    description: '统计概览数据',
    type: StatsOverviewDto
  })
  data: StatsOverviewDto;
}